package cn.rengy.tpa.wxmp.pay.exception;

import javax.xml.bind.annotation.XmlRootElement;

import cn.rengy.tpa.wxmp.pay.PayCode;

/**
 * 支付API调用异常 return_code=FAIL
 * <p/>
 */
@XmlRootElement(name = "xml")
public class PayApiException extends RuntimeException {

	private static final long serialVersionUID = 6611442315176836457L;

	public PayApiException() {
	}

	public PayApiException(PayCode payCode, String return_msg) {
		super(return_msg);
		this.return_code = payCode.toString();
		this.return_msg = return_msg;
	}

	public PayApiException(String return_code, String return_msg) {
		super(return_msg);
		this.return_code = return_code;
		this.return_msg = return_msg;
	}

	private String return_code;
	private String return_msg;

	public String getReturn_code() {
		return return_code;
	}

	public void setReturn_code(String return_code) {
		this.return_code = return_code;
	}

	public String getReturn_msg() {
		return return_msg;
	}

	public void setReturn_msg(String return_msg) {
		this.return_msg = return_msg;
	}

	@Override
	public String toString() {
		return "PayApiException{" + "return_code='" + return_code + '\'' + ", return_msg='" + return_msg + '\'' + '}';
	}
}
